<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../0_assets/vue2.js"></script>
</head>

<body>
    <div id="app">
        <li v-for="item in arr" :key="item.id">{{ item.name }} </li>
    </div>
    <script>
        let app = new Vue({
            el: '#app',
            data() {
                return {
                    arr: [
                        { name: 'mikaisa1', id: 1 },
                        { name: 'mikaisa2', id: 2 },
                        { name: 'mikaisa3', id: 3 },
                        { name: 'mikaisa4', id: 4 },
                    ]
                }
            },
            methods: {
                // pop、unshift、shift、push、splice、reverse都可以触发视图更新
            }
        })
    </script>
</body>

</html>